<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>群裂变</title>
  <link rel="stylesheet" href="/css/public.css">
  <link rel="stylesheet" href="/layui/css/layui.css">
  <link rel="stylesheet" href="/hyqcss/public.css">
  <style type="text/css">
    body{
      background: #e9e9e9;
    }
    /*公共头部带搜索*/
    .public_container{
      margin: 20px;
      height: 250px;
      background: #fff;
    }
    .public_title_container{
      height: 54px;
      padding: 0 20px;
      font-size: 14px;
      display: flex; 
      align-items: center;
      background: #f9f9f9;
      border-bottom: 1px solid #f0f0f0;
    }
    .public_buttonSearch_container{
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20px;
      background: #fff;
    }
    .public_buttonSearch_container a{
      color: #fff;
      background-color: #1E9FFF;
      text-shadow: 0 -1px 0 rgba(0,0,0,.12);
      height: 24px;
      padding: 4px 15px;
      font-size: 14px;
      border-radius: 2px;
      display: flex;
      align-items: center;
    }
    .public_Search_container{
      position: relative;
    }
    .public_Search_container input{
      width: 240px;
      height: 32px;
      border: 1px solid #d9d9d9;
    }
    .public_Search_container i{
      position: absolute;
      bottom: 6px;
      right: 10px;
      cursor: pointer;
    }
    .chat-li {
        margin-bottom: 8px;
        display: -webkit-box;
        display: flex;
        -webkit-box-align: center;
        align-items: center;
        box-sizing: border-box;
    }
    .chat-info>img {
        width: 30px;
        height: 30px;
        margin-right: 7px;
    }
    .chat-status.red {
        background: #fbe3e2;
        border: 1px solid #ffb4b4;
    }
    .chat-status.green {
        background: #e8fcdc;
        border: 1px solid #a1ec9f;
    }
    .chat-status.gray {
        background: #f2f2f2;
        border: 1px solid #d1d1d1;
    }
    .chat-status {
        width: 58px;
        height: 22px;
        font-size: 12px;
        line-height: 22px;
        color: rgba(0,0,0,.65);
        text-align: center;
        border-radius: 2px;
        margin-left: 16px;
        word-break: keep-all;
        white-space: nowrap;
    }
    .chat-info {
        width: 160px;
        height: 38px;
        padding: 12px 13px;
        background: #fff;
        border: 1px solid #e6e6e6;
        box-sizing: border-box;
        border-radius: 2px;
        display: -webkit-box;
        display: flex;
        -webkit-box-align: center;
        align-items: center;
    }
    .chat-list-wrap {
        max-height: 90px;
    }
  </style>
</head>
<body>
    <!-- 顶部提示框 开始 -->
<div class="public_tipSetting_contaienr">
<ul class="public-header-nav">
<li><a href="platform.html">授权管理</a></li>
<li><a class="public-header-nav-active" href="#">公众号配置</a></li>
</ul>
</div>
<div class="public_container">
     <!-- /*公共头部带搜索*/ -->
     <div class="public_content">
          <div class="public_title_container">
               <p>请设置授权使用默认公众号</p> 
          </div>
     </div> 
     <form class="layui-form" id="form1">
          <div class="public_form_container" style="margin-top: 20px;">
               <div class="public_form_content">
                    <div class="public_form_List">
                         <div class="public_formTitle_container">
                              <lable class="layui-form-label">公众号：</lable>
                         </div>
                         <div class="public_formOther_container">
                              <div class="layui-input-block" style="width: 50%">
                                   <select name="authorizer_appid" lay-filter="authorizer_appid" id="authorizer_appid" >
                                        <option value=""></option>
                                        {loop $gzh_list as $gzh}
                                             <option value="{$gzh['authorizer_appid']}" {if $gzh["is_checked"] == 1} selected {/if}>{$gzh['message']}</option>
                                        {/loop}
                                   </select>
                              </div>
                         </div>
                    </div>
               </div>
          </div>  
     </form>
    <!--  <div class="public_form_container" style="margin-top: 20px;">
          <div class="public_form_content">
               <div class="public_form_List">
                    <div class="public_formTitle_container">
                         <lable class="layui-form-label">AppSecret：</lable>
                    </div>
                    <div class="public_formOther_container">
                         <div class="layui-input-block">
                              <input type="text" name="AppSecret" id="AppSecret" required  lay-verify="required" placeholder="请输入公众号AppSecret" autocomplete="off" class="layui-input" style="width: 80%" value="{$appsecret}">
                         </div>
                    </div>
               </div>
          </div>
     </div>   --> 
     <div style="padding-left: 100px;margin-top: 20px;">
          <button class="layui-btn layui-btn-normal apanel-confirm" onclick="upd_appid()" lay-filter="levelEditForm">设置为默认公众号</button>
     </div>
</div>
<script src="/cdn/jquery.js"></script>
<script src="/layui/layui.js"></script>
<script src="/layui/layui.all.js"></script>
<script src="/js/ajax.js"></script>
<script type="text/javascript">
// layui.use('form', function(){
//      var form = layui.form;
//      form.on('select(authorizer_appid)', function (data) {
//           if(data.value){
//                myAjaxPost(false, true, 'get_appid.html', { id:data.value}, function (resp) {
//                     $("#AppSecret").val(resp.data);
//                })
//           }else{
//               $("#AppSecret").val("");
//           }
//      });
// })
function upd_appid(id){
     var id = $("#authorizer_appid").val();
     myAjaxPost(false, true, 'upd_set.html', { id:id}, function (resp) {
          tusi(resp.msg);
     });
}
</script>
</body>
</html>